package com.zxg.zbc.dal.dataobject.concurrent;

import java.util.Date;

public class LastProcessed {

  private Long                id;

  private Lock.ConcurrentType type;

  private Long                lastProcessId;

  private Date                lastProcessTime;

  private String              lastProcessHost;

  private String              descr;

  private Date                gmtCreated;

  private Date                gmtModified;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Integer getType() {
    return type.getValue();
  }

  public void setType(Lock.ConcurrentType type) {
    this.type = type;
  }

  public void setType(Integer type) {
    this.type = Lock.ConcurrentType.getType(type);
  }

  public Long getLastProcessId() {
    return lastProcessId;
  }

  public void setLastProcessId(Long lastProcessId) {
    this.lastProcessId = lastProcessId;
  }

  public Date getLastProcessTime() {
    return lastProcessTime;
  }

  public void setLastProcessTime(Date lastProcessTime) {
    this.lastProcessTime = lastProcessTime;
  }

  public String getLastProcessHost() {
    return lastProcessHost;
  }

  public void setLastProcessHost(String lastProcessHost) {
    this.lastProcessHost = lastProcessHost;
  }

  public String getDescr() {
    return descr;
  }

  public void setDescr(String descr) {
    this.descr = descr;
  }

  public Date getGmtCreated() {
    return gmtCreated;
  }

  public void setGmtCreated(Date gmtCreated) {
    this.gmtCreated = gmtCreated;
  }

  public Date getGmtModified() {
    return gmtModified;
  }

  public void setGmtModified(Date gmtModified) {
    this.gmtModified = gmtModified;
  }

  @Override
  public String toString() {
    return "LastProcessed [id=" + id + ", type=" + type + ", lastProcessId=" + lastProcessId + ", lastProcessTime=" + lastProcessTime + ", lastProcessHost="
        + lastProcessHost + ", descr=" + descr + ", gmtCreated=" + gmtCreated + ", gmtModified=" + gmtModified + "]";
  }

  public static enum DataGetType {
    TIME, ID
  }
}
